{% extends "blog/base.html" %}
{% block title %}
  杨学峰博客 | 文章归档
{% endblock %}

{% block path %}
  当前位置&nbsp;:&nbsp;<a href = "{% url 'home'%}">首页&nbsp;</a>»&nbsp;文章归档
{% endblock %}

{% block content %}
  <link rel="stylesheet" href="/static/plugins/history/history.css">
	{% if archive %}
    <div class="archive">
      <div class="head-warp">
        <div class="head">
          <div class="nav-box">
            <ul>
              <li class="cur" style="height:20px;"></li>
            </ul>
          </div>
        </div>
      </div>
      <div class="main">
        <div class="history">
          {% for key, value in archive.items %}
          <div class="history-date">
            <ul>
              <h2><a href="#nogo">{{ key|date:'Y' }}年{{ key|date:'m' }}月</a></h2>
              {% for i in value %}
              <li class="green">
                <h3>{{ key|date:'m' }}.{{ i.publish_time|date:'d' }}<span>{{ key|date:'Y' }}</span></h3>
                <dl>
                  <a href="{{ i.get_absolute_url }}" title="{{ i.title }}">
                    <p>
                      {% if i.title|length > 40 %}
                        {{ i.title|truncatechars:40 }}...
                      {% else %}
                        {{ i.title }}
                      {% endif %}
                    </p>
                  </a>
                </dl>
              </li>
              {% endfor %}
            </ul>
          </div>
          {% endfor %}
        </div>
      </div>
    </div>
  {% endif %}
  <script src="/static/plugins/history/history.js"></script>
{% endblock %}

{% block side %}
	{% include "blog/_side.html" %}
{% endblock %}
